const DEBUG = require('debug')

function Logger(name) {

    const debug = DEBUG(name + 'Debug');
    const info = DEBUG(name + 'Info');
    const error = DEBUG(name + 'Error');

    this.debug = (message) => {
        debug(message);
    }
    this.info = (message) => {
        info(message);
    }
    this.error = (message) => {
        error(message);
    }

    return this;
}

module.exports = function(name) {
    return new Logger(name);
}

